#include "bga/system/Resource.h"

using namespace std;

namespace bga
{

Resource::Resource(const string& name) : name(name), refCount(0)
{

}

Resource::~Resource()
{

}

const string& Resource::getName() const
{
    return this->name;
}

void Resource::addRef()
{
    this->refCount++;
}

void Resource::release()
{
    this->refCount--;
    if(this->refCount <= 0)
    {
        delete this;
    }
}

}
